<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>后台管理系统-HTML5后台管理系统</title>
    <meta name="keywords"  content="设置关键词..." />
    <meta name="description" content="设置描述..." />
    <meta name="author" content="DeathGhost" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <link rel="icon" href="images/icon/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <script src="javascript/jquery.js"></script>
    <script src="javascript/plug-ins/customScrollbar.min.js"></script>
    <script src="javascript/plug-ins/echarts.min.js"></script>
    <script src="javascript/plug-ins/layerUi/layer.js"></script>
    <script src="editor/ueditor.config.js"></script>
    <script src="editor/ueditor.all.js"></script>
    <script src="javascript/plug-ins/pagination.js"></script>
    <script src="javascript/public.js"></script>
</head>
<body>
<div class="main-wrap">
    <div class="side-nav">
        <div class="side-logo">
            <div class="logo">
				<span class="logo-ico">
					<i class="i-l-1"></i>
					<i class="i-l-2"></i>
					<i class="i-l-3"></i>
				</span>
                <strong>模块化后台管理模板</strong>
            </div>
        </div>

        <nav class="side-menu content mCustomScrollbar" data-mcs-theme="minimal-dark">
            <h2>
                <a href="index.html" class="InitialPage"><i class="icon-dashboard"></i>数据概况</a>
            </h2>
            <ul>
                <li>
                    <dl>
                        <dt>
                            <i class="icon-columns"></i>综合办公管理<i class="icon-angle-right"></i>
                        </dt>
                        <dd>
                            <a href="car1.html">车辆管理</a>
                        </dd>

                    </dl>
                </li>
            </ul>
        </nav>

        <footer class="side-footer">© DeathGhost 版权所有</footer>

    </div>
    <div class="content-wrap">
        <header class="top-hd">
            <div class="hd-lt">
                <a class="icon-reorder"></a>
            </div>
            <div class="hd-rt">
                <ul>
                    <li>
                        <a href="#" target="_blank"><i class="icon-home"></i>前台访问</a>
                    </li>
                    <li>
                        <a><i class="icon-random"></i>清除缓存</a>
                    </li>
                    <li>
                        <a><i class="icon-user"></i>管理员:<em>DeathGhost</em></a>
                    </li>
                    <li>
                        <a><i class="icon-bell-alt"></i>系统消息</a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" id="JsSignOut"><i class="icon-signout"></i>安全退出</a>
                    </li>
                </ul>
            </div>
        </header>
        <main class="main-cont content mCustomScrollbar">
            <div class="page-wrap">
                <!--开始::内容-->
                <section class="page-hd">
                    <header>
                        <h2 class="title">新建车辆</h2>
                        <p class="title-description">
                        </p>
                    </header>
                    <hr>
                </section>

                    <div class="form-group-col-2">
                        <div class="form-label">车牌号：</div>
                        <div class="form-cont">
                            <input type="text" placeholder="四位数字..." value="" id="carid"  name="empno"  class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">规格型号：</div>
                        <div class="form-cont">
                            <input type="text" placeholder="小于10位..." value="" id="guige"   name="ename" class="form-control form-boxed" style="width:300px;">
                            <span id="msgid"></span>
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">座位数：</div>
                        <div class="form-cont">
                            <select style="width:auto;" id="zuoweishu">>
                                <option value="0">请选择座位数</option>
                                <option value="2">2</option>
                                <option value="5">5</option>
                                <option value="7">7</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">购买日期：</div>
                        <div class="form-cont">
                            <input type="date" id="goumairqi"  class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">原值(万元)：</div>
                        <div class="form-cont">
                            <input type="text" id="money" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">登记日期</div>
                        <div class="form-cont">
                            <input type="date" id="dengjrqi" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">车辆类型：</div>
                        <div class="form-cont">
                            <select style="width:auto;" id="cartypeid">
                                <option value="0">请选择车型</option>
                                <option value="1">轿车</option>
                                <option value="2">suv</option>
                                <option value="3">mpv</option>
                                <option value="4">面包车</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">使用状态：</div>
                        <div class="form-cont">
                            <select style="width:auto;" id="shiyongzhuangtaiid">
                                <option value="0">请选择状态</option>
                                <option value="1">空闲状态</option>
                                <option value="2">使用中</option>
                                <option value="3">维修中</option>
                                <option value="4">保养中</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">产权所属部门：</div>
                            <select style="width:auto;" id="deptno">
                                <option value="0">请选择部门</option>
                                <option value="10">财务部</option>
                                <option value="20">开发部</option>
                            </select>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">部门车辆管理员：</div>
                        <div class="form-cont">
                            <input type="text"  id="bumenchaliangguanliyuan" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">使用汽油编号：</div>
                        <div class="form-cont">
                            <input type="text"  id="shiyongqiyoubiaohao" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">最近一次大修时间：</div>
                        <div class="form-cont">
                            <input type="date"  id="zuihouyicidaxiutime" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">安全负责保养人：</div>
                        <div class="form-cont">
                            <input type="text"  id="anquanbaoyangfuzeren" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">下次年审时间：</div>
                        <div class="form-cont">
                            <input type="date"  id="xiacinianshentime" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">本次年审时间：</div>
                        <div class="form-cont">
                            <input type="date"  id="bencinianshentime" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">功率：</div>
                        <div class="form-cont">
                            <input type="text"  id="kw" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">排量：</div>
                        <div class="form-cont">
                            <input type="text"  id="pailiang" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">总质量：</div>
                        <div class="form-cont">
                            <input type="text"  id="kg" class="form-control form-boxed" style="width:300px;">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">养路费缴纳情况：</div>
                        <div class="form-cont">
                            <input type="text"  id="ylfjnqk" class="form-control form-boxed" style="width:800px;height: 50px">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">随车资料：</div>
                        <div class="form-cont">
                            <input type="text"  id="suicheziliao" class="form-control form-boxed" style="width:800px;height: 50px">
                        </div>
                    </div>
                    <div class="form-group-col-2">
                        <div class="form-label">备注：</div>
                        <div class="form-cont">
                            <input type="text"  id="beizhu" class="form-control form-boxed" style="width:800px;height: 50px">
                        </div>
                    </div>
                <div class="form-group-col-2">
                    <div class="form-label">填写人：</div>
                    <div class="form-cont">
                        <input type="text"  id="tianxeiren" class="form-control form-boxed" style="width:300px;">
                    </div>
                </div>
                <div class="form-group-col-2">
                    <div class="form-label">填写时间：</div>
                    <div class="form-cont">
                        <input type="date"  id="tianxeitime" class="form-control form-boxed" style="width:300px;">
                    </div>
                </div>
                    <div class="form-group-col-2">
                        <div class="form-label"></div>
                        <div class="form-cont">
                            <input type="button" class="btn btn-primary" value="保存" id="but4"/>
                            <input type="reset" class="btn btn-disabled" id="btn8" value="取消" />
                        </div>
                    </div>
                <!--开始::结束-->
            </div>
        </main>
        <footer class="btm-ft">
            <p class="clear">
                <span class="fl">©Copyright 2016 <a href="#" title="DeathGhost" target="_blank">DeathGhost.cn</a></span>
                <span class="fr text-info">
					<em class="uppercase">
						<i class="icon-user"></i>
						author:deathghost
					</em> |
					<em class="uppercase"><i class="icon-envelope-alt"></i>
						更多模板： <a href="http://www.mycodes.net/" target="_blank">源码之家</a>
					</em>
					<a onclick="reciprocate()" class="text-primary"><i class="icon-qrcode"></i>捐赠</a>
				</span>
            </p>
        </footer>
    </div>
</div>

</body>
<script src="javascript/jquery.js"></script>
<script>
    $(function (){
        $("#but4").click(function (){
            var carid=$("#carid").val();
            var guige=$("#guige").val();
            var zuoweishu=$("#zuoweishu").val();
            var goumairqi=$("#goumairqi").val();
            var money=$("#money").val();
            var dengjrqi=$("#dengjrqi").val();
            var cartypeid=$("#cartypeid").val();
            var shiyongzhuangtaiid=$("#shiyongzhuangtaiid").val();
            var deptno=$("#deptno").val();
            var bumenchaliangguanliyuan=$("#bumenchaliangguanliyuan").val();
            var shiyongqiyoubiaohao=$("#shiyongqiyoubiaohao").val();
            var zuihouyicidaxiutime=$("#zuihouyicidaxiutime").val();
            var anquanbaoyangfuzeren=$("#anquanbaoyangfuzeren").val();
            var xiacinianshentime=$("#xiacinianshentime").val();
            var bencinianshentime=$("#bencinianshentime").val();
            var kw=$("#kw").val();
            var pailiang=$("#pailiang").val();
            var kg=$("#kg").val();
            var ylfjnqk=$("#ylfjnqk").val();
            var suicheziliao=$("#suicheziliao").val();
            var beizhu=$("#beizhu").val();
            var tianxeiren=$("#tianxeiren").val();
            var tianxeitime=$("#tianxeitime").val();
            $.ajax({
                type:"post",
                url:"/car",
                async:true,
                data:JSON.stringify({
                    carid:carid,
                    guige:guige,
                    zuoweishu:zuoweishu,
                    goumairqi:goumairqi,
                    money:money,
                    dengjrqi:dengjrqi,
                    cartypeid:cartypeid,
                    shiyongzhuangtaiid:shiyongzhuangtaiid,
                    deptno:deptno,
                    bumenchaliangguanliyuan:bumenchaliangguanliyuan,
                    shiyongqiyoubiaohao:shiyongqiyoubiaohao,
                    zuihouyicidaxiutime:zuihouyicidaxiutime,
                    anquanbaoyangfuzeren:anquanbaoyangfuzeren,
                    xiacinianshentime:xiacinianshentime,
                    bencinianshentime:bencinianshentime,
                    kw:kw,
                    pailiang:pailiang,
                    kg:kg,
                    ylfjnqk:ylfjnqk,
                    suicheziliao:suicheziliao,
                    beizhu:beizhu,
                    tianxeiren:tianxeiren,
                    tianxeitime:tianxeitime,
                }),
                //定义发送请求的数据格式是json字符串
                contentType:"application/json;charset=utf-8",
                dataType:'text',
                success:function(data,status,xhr){
                    console.log(data);
                    if (data=='msgok'){
                        alert("新建成功");
                        window.location.href="car1.html";
                    }else{
                        alert("新建失败");
                    }
                },
                // 失败
                error:function(XMLHttpRequest, textStatus, errorThrown){
                    alert(textStatus+"响应失败"+errorThrown);
                }
            })
        })
    })

</script>
</html>
